package com.ado.abyss.core.service;

import java.util.List;
import java.util.Set;


import com.ado.abyss.core.dal.model.SysUser;
import com.ado.abyss.core.dal.model.SysUserRole;
import com.ado.abyss.core.params.page.PageRequest;
import com.ado.abyss.core.params.page.PageResult;
import com.github.pagehelper.PageInfo;

public interface SysUserService {


	/**
	 * 按姓名查找
	 * @param username
	 * @return
	 */
	SysUser findByName(String username);

	/**
	 * 查找用户的菜单权限标识集合
	 * @param userName
	 * @return
	 */
	Set<String> findPermissions(String userName);


	/**
	 * 查找用户的角色集合
	 * @param userName
	 * @return
	 */
	List<SysUserRole> findUserRoles(Long userId);

	/**
	 * 
	 * @param id
	 * @return
	 */
	SysUser getById(Long id) ;

	/**
	 * 
	 * @param records
	 * @return
	 */
	boolean delete(List<SysUser> records);

	/**
	 * 
	 * @param record
	 * @return
	 */
	boolean save(SysUser record);

	/**
	 * 
	 * @param pageRequest
	 * @return
	 */
	PageResult findPage(PageRequest pageRequest);

	/**
	 * find all user 
	 * @return
	 */
	List<SysUser> findAll();

}
